import { defHttp } from '/@/utils/http/axios'
import { ErrorMessageMode } from '/#/axios'

enum Api {
  List = '/api/website/admin/product/price/list',
 Set='/api/website/admin/product/price/set',
 Commit='/api/website/admin/product/pay/commit',
 Send='/api/website/admin/product/price/send',
 Online='/api/website/admin/product/online',
 Pause='/api/website/admin/product/pause',
 Sendproduct='/api/website/admin/product/send',
 Delete='/api/website/admin/product/delete',
 Saveblurb='/api/website/admin/product/blurb/save',
 Savemanual='/api/website/admin/product/manual/save',
 GetList='/api/website/admin/product/list',

}

//软件价格列表
export function getList(params:any) {
  return defHttp.get(
    { url: Api.List,
      params,
     },
  )
}
//保存软件价格
export function addPrice(params:any) {
  return defHttp.post(
    { url: Api.Set,
      params,
     },
  )
}
//提交到账数据
export function commitPay(params:any) {
  return defHttp.post(
    { url: Api.Commit,
      params,
     },
  )
}
//发送价格
export function send(params:any) {
  return defHttp.post(
    { url: Api.Send,
      params,
     },
  )
}
//上线
export function online(params:any) {
  return defHttp.post(
    { url: Api.Online,
      params,
     },
  )
}
//暂停
export function pause(params:any) {
  return defHttp.post(
    { url: Api.Pause,
      params,
     },
  )
}
//发送产品设置
export function sendProduct(params:any) {
  return defHttp.post(
    { url: Api.Sendproduct,
      params,
     },
  )
}
//删除产品设置
export function deleteProduct(params:any) {
  return defHttp.post(
    { url: Api.Delete,
      params,
     },
  )
}
//保存产品简介
export function saveBlub(params:any) {
  return defHttp.post(
    { url: Api.Saveblurb,
      params,
     },
  )
}
//保存操作指南 
export function saveManual(params:any) {
  return defHttp.post(
    { url: Api.Savemanual,
      params,
     },
  )
}

//获取产品列表
export function getProductList(params:any) {
  return defHttp.get(
    { url: Api.GetList,
      params,
     },
  )
}
